<div class="container not-right" style="margin-bottom: 100px;">
	<div class="row">

<h1>Detalle de pedido</h1>

<p><span class="bold-text">Fecha:</span> <%= @order.created_at.strftime("%d/%m/%Y") %></p>
<p><span class="bold-text">Monto total:</span> <%= show_price @order.total_amount %></p>

<table>
    <tr>
      <td class="bold-text">Producto</td>
      <td class="bold-text" style="padding-left: 10px;">Color</td>
      <td class="bold-text" style="padding-left: 10px;">Precio u.</td>
      <td class="bold-text" style="padding-left: 10px;">Cantidad</td>
      <td class="bold-text" style="padding-left: 10px;">Subtotal</td>
    </tr>
  <% @order.order_details.each do |detail| %>
    <% prod = Product.unscoped.find(detail.product_id) %>

    <tr>
        <td><%= prod.model %></td>
        <td style="padding-left: 10px;"><%= show_color detail.product_color %><%#= show_color(detail.product_color) %></td>
        <td style="padding-left: 10px;"><%= show_price detail.unit_price %></td>
        <td style="padding-left: 10px;"><%= detail.quantity %></td>
        <td style="padding-left: 10px;"><%= show_subtotal(detail.unit_price, detail.quantity) %></td>
    </tr>
  <% end %>
</table>

	</div>
</div>